import React from 'react';
import SelfHead from 'components/common/selfHead';
import { List } from 'antd-mobile';
import { history } from 'umi';
import './index.less';
const Item = List.Item;

export default function Modify() {
  function handleClick() {
    history.push('/');
    sessionStorage.removeItem('token');
    sessionStorage.removeItem('companyType');
  }
  return (
    <div className="modify">
      <SelfHead title="账号管理" />
      <div className="modify-body">
        <List
          className="self-list"
          onClick={() => history.push('/modify/passWord')}
        >
          <Item arrow="horizontal">修改密码</Item>
        </List>
      </div>
      <div className="passWord-btn" onClick={handleClick}>
        <span>退出登录</span>
      </div>
    </div>
  );
}
